<?php $this->load->view('header');?>

<div class="page-container">
	<?php $this->load->view('sidebar');?>
	<!-- BEGIN CONTENT -->
	<div class="page-content-wrapper">
		<div class="page-content">
			<?php $this->load->view('user/_sub_nav');?>
			<div class="row">
				<div class="col-md-12">
					<form action="" method="POST" class="form-horizontal" role="form" id="user_add_form">
					<div class="form-body">

							<h3 class="form-section">基本信息</h3>									
							
							<div class="col-md-12">
								<div class="form-group">
									<label class="control-label col-md-3">用户名<span class="required">*</span></label>
									<div class="col-md-7">
										<input type="text" name="username" class="form-control">
									</div>
								</div>
							</div>
							
							<div class="col-md-12">
								<div class="form-group">
									<label class="control-label col-md-3">昵称</label>
									<div class="col-md-7">
										<input type="text" name="nickname" class="form-control">
									</div>
								</div>
							</div>
							
							<div class="col-md-12">
								<div class="form-group">
									<label class="control-label col-md-3">密码<span class="required">*</span></label>
									<div class="col-md-7">
										<input type="text" name="password" class="form-control">
									</div>
								</div>
							</div>

							<div class="col-md-12">
								<div class="form-group">
									<label class="control-label col-md-3">所属群组<span class="required">*</span></label>
									<div class="col-md-7">
										<select name="group" class="form-control" >
											<?php foreach ($groups as $group):?>
												<option value="<?php echo $group['id'];?>"><?php echo $group['name'];?></option>
											<?php endforeach;?>
										</select>
									</div>
								</div>
							</div>
							
							
							<!-- <h3 class="form-section">权限</h3>	

							<div class="col-md-12">
								<div class="form-group">
									<label class="col-md-3 control-label">合作方<span class="required">*</span></label>
									<div class="col-md-9">
										<div class="checkbox-list" id="partner_checkbox_list" data-error-container="#form_partner_error">
											<label class="checkbox-inline">
											<input type="checkbox" id="" value="0" class="checkall" > 全选 </label>
											
											<?php foreach ($this->config->item('partners') as $key => $value):?>
												<label class="checkbox-inline">
												<input type="checkbox" id="" name="partner[]" class="checkboxes" value="<?php echo $key;?>"><?php echo $value;?></label>
											<?php endforeach;?>
										</div>
										<div id="form_partner_error">
										</div
									</div>
								</div>
							</div>

							<div class="col-md-12">
								<div class="form-group">
									<label class="col-md-3 control-label">游戏<span class="required">*</span></label>
									<div class="col-md-9">
										<div class="checkbox-list" id="game_checkbox_list" data-error-container="#form_game_error">
											<label class="checkbox-inline">
											<input type="checkbox" id="" value="" class="checkall"> 全选 </label>
											<?php foreach ($this->config->item('games') as $key => $value):?>
												<label class="checkbox-inline">
												<input type="checkbox" id="" class="checkboxes" name="game[]" value="<?php echo $key;?>"><?php echo $value;?></label>
											<?php endforeach;?>											
										</div>
										<div id="form_game_error">
										</div>
									</div>
								</div>
							</div>

							<div class="col-md-12">
								<div class="form-group last">
									<label class="col-md-3 control-label">渠道<span class="required">*</span></label>
									<div class="col-md-9">
										<div class="checkbox-list" id="channel_checkbox_list"  data-error-container="#form_channel_error">
											<label class="checkbox-inline">
											<input type="checkbox" id="" value="" class="checkall"> 全选 </label>
											<!-- <div class="channel_list">
											</div>	 -->								
										</div>
										<div id="form_channel_error">
										</div>
									</div>
								</div>
							</div> 
						</div>
							
						<div class="form-actions fluid">
							<div class="col-md-offset-3 col-md-9">
								<button type="submit" class="btn green">保存</button>
								<button type="button" class="btn default">取消</button>
							</div>
						</div>

					</form>
				</div>
			</div>
		</div>
	</div>
</div>	

<?php $this->load->view('footer.php');?>

<!-- Jquery Validate -->
<script type="text/javascript" src="assets/plugins/jquery-validation/dist/jquery.validate.min.js"></script>
<!-- Jquery Validate -->

<script type="text/javascript" src="assets/plugins/jquery.form.js"></script>

<script type="text/javascript" src="assets/scripts/custom/adminer.js"></script>
<script>
jQuery(document).ready(function() {    
   App.init(); // initlayout and core plugins
   Adminer.init();
});
</script>

</body>
<!-- END BODY -->
</html>
